package com.pachong.controller;

import com.pachong.pojo.MyLikeNews;
import com.pachong.pojo.PaChong;
import com.pachong.service.MyLikeNewsServiceImpl;
import com.pachong.unti.PureNetUtil;
import com.pachong.unti.ReturnDatas;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * Created by Administrator on 2018/5/13 0013.
 */
@Controller
@RequestMapping("/myLikeNews")
public class MyLikeNewsController {
    @Resource
    private MyLikeNewsServiceImpl myLikeNewsService;

    @RequestMapping("/like")
    public @ResponseBody
    ReturnDatas test(MyLikeNews record, HttpServletResponse httpServletResponse, HttpServletRequest httpServletRequest){
        ReturnDatas returnDatas=ReturnDatas.getSuccessReturnDatas();
        try {
           List<MyLikeNews> myLikeNewsList=myLikeNewsService.selectByList(record);
            returnDatas.setData(myLikeNewsList);
        }catch (Exception e){
            e.printStackTrace();
        }
        return returnDatas;
    }
}
